package com.itheima.enumdemo;

import java.util.HashMap;

/**
 * @ClassName: AmtTest
 * @Description:
 * @author: Yrd
 * @date: 2021-10-08 14:16
 */
public class AmtTest {

    public static void main(String[] args){
        HashMap mappingList = getMappingList();
        System.out.println("打印枚举：");
        System.out.println(mappingList);
        System.out.println("===============");
        getMappingList2();
        System.out.println("===============");

        System.out.println(BaseEvent.OPEN.name());
        System.out.println(BaseEvent.OPEN);
    }

    /**
     *
     * @Title : getMappingList
     * @Description :

     * @return java.util.HashMap
     *
     * @user : Yrd
     * @date : 2021-10-09 19:00
     */
    private static HashMap getMappingList(){
        HashMap map = new HashMap();
        for(BaseAmtType amtType:BaseAmtType.values()){
            System.out.println(amtType);
            System.out.println(amtType.name());
            map.put(amtType.toString(),amtType.name());
        }
        return map;
    }

    private static HashMap getMappingList2(){
        HashMap map = new HashMap();
        for(BaseEvent amtType:BaseEvent.values()){
            System.out.println(amtType);
            System.out.println(amtType.name());
            map.put(amtType.toString(),amtType.name());
        }
        return map;
    }


}
